HTML-OptimizerPlus is a versatile tool for managing one or more (max.16) web sites. It checks your web pages for broken hyperlinks and dangling tags and optimizes both web pages and images.
The program offers 5 functions and supports drag and drop. Further it features instant uploading, the 'duplimize' option and the 'alias mirror'.
Its less equiped brother is HTML-Optimizer.
1. Its main function is optimizing, i.e. saving space on your web pages by removing unnecessary characters and tags. Though the savings percentage (10 to 20%) may seem small, load time savings is much higher as your client's browser parses the pages more efficient. This program does not remove quotation marks from attribute values - as some other optimizers do to get impressive savings - because this actually would slow down the browser's parsing speed!
Client-side and server-side JavaScript can be optimized too.
See About Optimizing for more info.
The resource forks of graphic files can be deleted. See Deleting Resource Forks of Graphic Files for more info.
2. Another function is to check the tagged pair structure of your web pages. Any dangling tag will be reported. If you choose the extensive mode, IMG tags are checked for the presence of the Width, Height and Alt attributes.
The Width and Height attributes are needed by the browser to build up the page as fast as possible. At the Preferences you can choose to add missing Width and Height attributes with pixel values which are automatically detected (you need QuickTime™ 3 or later for this).
The Alt attributes make your page more user-friendly. At the Preferences you can choose to have the Alt attributes being checked or not. Moreover, you can decide to add missing Alt attributes and attach either a text string or the name of the picture. As text string you could type "FindMe" to enable you to easily find and replace the added Alt attributes in your Text Editor.
Note that changes are put in the original pages of your web folder, unless you choose at the Preferences the Include Checking Tags option, i.e. checking tags on-the-fly when optimizing.
Obsolete and browser-dependent tags are reported as well.
If you select HTML4 Compliant at the Preferences, deprecated tags according to HTML4, for example <FONT> and <CENTER>, are reported.
These functions work also if you choose the Fast & Simple mode.
3. You can choose to not only check the tagged pair structure and IMG tags, but also mark the dangling tags and incomplete IMG tags with the bullet character •, so that you can find them quickly. The marking within a nested tag structure is not always completely accurate, but still easy to interpret.
Saved files get • as prefix. Of course, you do not upload a marked page to a web server!
If a dangling tag is found, the 'smaller than' character < is replaced with • ; so if, for example, the tag </FORM> is missing, you see •FORM> instead of the accompanying <FORM> , or vice versa. Note that the Mark function is equivalent to the Extensive mode of the Check Tags function.
4. You can check the validity of your links, excluding those that start with 'http://', 'mailto:' or '#'. Web pages are checked for broken href, img src, lowsrc, img dynsrc, embed src and <script>.src links, to a depth of 8 levels of your web folder.
This function requires that a folder with its nested folders is analyzed for its content. HTML-OptimizerPlus does this automatically when necessary.
5. Finally, you can check for special characters, such as é and §, and convert them to the appropriate &xxx; notation; all within the ASCII 128 to 255 range. Note that changes are put in the original pages of your web folder, unless you choose at the Preferences the Include Converting Special Characters option, i.e. checking tags on-the-fly when optimizing.
About Optimizing
You can manage as many as 16 web folders and you can easily select them via the Web Folder popup menu.
During the optimizing process, your original pages remain untouched for later editing, which is quite useful since optimized pages are hard to read for humans (unless you have turned off 'Remove Returns' at the Preferences).
Optimized web pages are saved as new text files with only a data fork, by default with the Creator Type "R*ch" of BBEdit - see the Preferences - and put in their own optimizer output folder, which is a folder with the same name as its associated web folder, with the file extension ".opt" added to it. Each web folder has its own optimizer output folder, of course, but "Optimizer Output folder" is the generic name used by this program in its dialogs.
When you optimize your entire web folder, this folder is duplicated and all optimized files copied by default from the optimizer output folder to this duplicate. The 'duplimized' web folder gets the file extension ".dup".
If you choose a (file in a) folder different from the current web folder, you are asked if you want to switch to the other (web) folder. Switching is executed on-the-fly, which prevents contamination of an optimizer output folder with alien items. If you have chosen a (file in a) folder that is not listed in the web folder popup menu, you will be prompted on this. In that case, the alien optimized file will appear in the current optimizer output folder. Note that you are not prompted if you keep on working with the alien folder.
If you don't have BBEdit, download a free copy of BBEdit Lite from http://www.barebones.com/free/bbedit_lite.html
Warning: Do not replace your original pages by optimized ones! Keep your originals in a safe place!
At the time that you configured this program, an empty nested folder structure was created in the optimizer output folder, identical to the directory of the associated web folder.
Files that reside in a nested folder of a web folder and which are allowed to be optimized, are saved to the corresponding folder in the optimizer output folder.
If you choose Entire Web Folder, you don't get the usual Open Folder Dialog when you click the Start button. In that case, your entire web folder is dealt with, including nested folders, all in one pass! However, keep in mind that only optimized files will be saved to the optimizer output folder, so don't be surprised at empty folders there!
Tip: Make an Alias Mirror of a web folder in its optimizer output folder, in order to be able to view the optimized web pages without broken links.
View the optimized pages in your browser before uploading them to a web server. You can simply click the View button for this purpose.
Do not open an optimized page with the HTML Editor that originally created it. This can undo most of the optimizing because the Editor adds its own formatting again! Using BBEdit is recommended. SimpleText is also possible but has a 32K limit.
The different logs - one for each function - are saved to the Logs folder in the HTML-OptimizerPlus folder and can be viewed by clicking the History Log button. You get a warning when a log approaches its 32K limit, so that you can save them to a backup file before you have to clear them. The logs are SimpleText documents; due to the limited size scrolling will never be a drag.
If you click the History Log button with the Option key held down, you see the most recent log data again (what comes in handy when you have hided the log too quickly). The small o character on the left side of the button reminds you of this feature.
What is Duplimizing?
Duplimizing means duplicating plus optimizing. This word is invented by the author of this program. When you choose for duplimizing, your original web folder is duplicated and the optimized files in the Optimizer Output folder are then copied to the duplicate. So you end up with an optimized duplicate of your entire web folder, the ideal starting point for uploading folders (directories).
You can even make the duplicate folder more identical to the original web folder by selecting the Restore Finder Info option at the Preferences before you start optimizing, which restores the values for Creator Type, Creation Date, Modification Date and Finder Label. This may come in handy when you use an automatic backup program.
NOTE: You better not use the Restore Finder Info option if you only want to upload to your web server the recently optimized file(s). In that case, it's best to choose a label at the Preferences so that you can easily recognize which file is the most recent one.
If you check the Duplimize option at the Preferences, duplimizing will take place automatically after optimizing an entire web folder. If you want to duplimize later on, you can use the Duplimize command from the File menu.
The name of the duplimized folder gets the file extension ".dup".
Drag and Drop via HTML-Dropper
The drag & drop utility 'HTML-Dropper' makes things easier for you. Just drop one or more files and/or folders onto its icon or an alias to it, and the job is done right away.
The setting of the Functions menu defines which action is executed. You don't need to choose File or Folder first; HTML-Dropper will detect whether it's a file or a folder. However, note that nested folder(s) are ignored. If you want to optimize or check an entire web folder, you should not use HTML-Dropper.
HTML-Dropper gives by default an alert when you drop a file onto it which can't be accepted by HTML-OptimizerPlus. Such a file will be skipped. You can choose to skip the alerts: double-click the HTML-Dropper icon and then click the Preferences button.
If HTML-OptimizerPlus is not open, it will be opened by HTML-Dropper when you start using it. The current function will be set to optimizing at startup. HTML-Dropper will quit automatically after use.
Which tags and characters are removed by default (standard setting)?
HTML-OptimizerPlus removes the following tags:
Optional end tags such as </OPTION> (not from XHTML files)
Forbidden end tags such as </IMG>
Redundant Editor tags such as X-CLARIS-USEIMAGEWIDTH
The following characters are removed:
Carriage returns, CRLFs and LFs
Tabs
Multiple whitespace
Redundant whitespace
Nothing is changed in code between the following tags:
<APPLET> and </APPLET>
<OBJECT> and </OBJECT>
<STYLE> and </STYLE>
<PRE> and </PRE>
<NOOP> and </NOOP>
The <NOOP> and </NOOP> custom tags - NOOP means No Optimizing - can be used by you to enclose a certain HTML code block that you don't want to be optimized.
Comments in HTML code and JavaScript code can be removed at choice. Note that comments and thus script code written as comment lines, e.g. cgi code, will not be removed from web pages whose file extension start with ".s", for example index.shtm.
Optimization of JavaScript and removing JavaScript comments can not only be executed on client-side scripts (between <SCRIPT> and </SCRIPT> tags) but also on server-side scripts (between <SERVER> and </SERVER> tags) for example in files with the .lasso file extension.
Incomplete URLs like "http://www.anyname.com" can be qualified, i.e. they will get a slash at the end which makes it twice as fast for a browser to go to that URL. Only select this option when you think it's necessary, to avoid needless waste of processing time.
Deleting Resource Forks of Graphic Files
You can choose to delete the resource forks of (copies of) graphic files whose file extensions have been allowed - see the Preferences. There is another input check on graphic files when selecting them: only files with the file type GIFf, JPEG, PNGf, MIE0, TIFF or SWFL are accepted by default (for web pages the allowed file type is TEXT). Advanced users may modify the graphic file type list at the Preferences.
Deleting the resource fork cuts down the size of the file, without any influence on the graphic content. A resource fork is of no use on the Internet.
The Configure menu
Under normal circumstances you don't have to use this menu.
However, if you wish to change the location of the optimizer output folder(s) or confirm it after an error message, or
if you have to confirm your current web folder, or
if you wish to confirm a different standard Internet browser (as set in Internet Config or the control panel Internet), or
if you need to update an alias mirror of your current web folder, or
if you need to update the current optimizer output directory because you changed the associated web folder's structure,
then you choose the appropriate menu command from the Configure menu.
The Select button
The Select button does the obvious: it shows an Open Dialog with the current web folder as the default directory. If you click the 'Entire Web Folder' button, the Select button changes its name into Start.
The Same Again button
If you click this button you start any desired action on the same file or folder that was recently selected, so you don't need to navigate through an Open… Dialog again. You can repeat this action for as long as you wish, until you select another file or folder. This button comes in handy when you want to perform various consecutive actions on the same file or folder, e.g. checking tags, checking links and finally optimizing.
The View button
This button enables you to view a page or an image in your browser, to make sure that the item is OK after optimizing. You can also view a single image in your browser.
If you click this button with the Option key held down, you reveal the item in the Finder.
Just select a line in the Log that refers to the file, to enable the button.
The Upload button
This button enables you to upload an optimized page or image directly to a web server. It does the same as the first menu command of the Remote Access menu, but now you don't have to find your way through an Open File dialog.
Just select a line in the Log - not via the History Log - that refers to the file, to enable the button. The button will only be enabled if the file resides in the current optimizer output folder. So the risk of uploading the wrong file to the wrong web server is minimized.
The button is only available if you have Mac OS 8.6 or later.
The View Code button
This button enables you to view the code of a page. Note that only the first 29000 characters of a file will be displayed (you can edit up to a size of 30000 characters).
Just select a line in the Log that refers to the file, to enable the button.
If you did an Optimize job, the name of the View Code button changes after clicking into Find String….
Instead of clicking this button you can also type F while holding down the Command Key. If a string is found, you can continue searching by pressing Return or Enter or typing Command-G. This Find option comes in handy when you are looking at HTML code from which the carriage returns have been removed.
If you did a Mark job, the name of the button changes after clicking into Find Bullets.
A found bullet changes into the character . If a bullet is found, you can continue searching by pressing Return or Enter or typing Command-G.
If you did a Convert job, the name of the button changes after clicking into Find &xxx; (only if you choose a file, in case of a folder the name will be Find String…).
If a converted character is found, the button is disabled and you can continue searching by pressing Return or Enter or typing Command-G.
After any of the jobs mentioned before, except marking, the name of the View button changes after clicking into Edit and the name of the Upload button changes into Save…. In this way, you can edit the text in the Code field and save it. After an optimizing job the changes are saved to the optimized web page, so you can proceed in one pass, and in the other cases the changes are saved to the original web page. If you want to make an original web page identical to its edited optimized counterpart - what you should do - you have to edit it later on.
The Edit and Save… buttons also appear when you open a text file from the File menu.
Alias Mirror
Most options in the Preferences section are self-explanatory, certainly if you turn on Balloon Help. Only the option Support Alias Mirror of Web Folder(s) needs to be explained a bit further:
When creating an alias mirror, aliases of all files, up to a depth of 8 levels, of your current web folder are put in its optimizer output folder, by default without aliases of files at root level of the web folder in order not to overcrowd the optimizer output folder. The alias mirror ensures that links are restored when viewing an optimized file from within the optimizer output folder, i.e. after clicking the View button.
Note that creating an alias mirror can take quite some time if you have a large web folder, but you can abort the process at all times.
Analyzing your Web Folder
When optimizing, checking links or converting, you may be confronted with the message 'Analyzing your web folder… please wait'. This happens when HTML-OptimizerPlus has detected a change in the current web folder, for example, after you have edited or added a file or after Alt strings or Width and Height pixel values have been added when checking IMG tags. If this is the case and you start optimizing, you will also be asked if you want to update the alias mirror (if this option has been selected at the Preferences). It's not always necessary to do this; your decision depends on how much the web folder has been changed.
The Remote Access menu
The commands in the Remote Access menu are only available if you have Mac OS 8.6 or later, because HTML-OptimizerPlus uses the new URL Access Library.
This menu enables you to upload files or folders to a remote server or download files or folders, receive a directory listing or send post parameters to be handled by a remote CGI script. For uploading only FTP (File Transfer Protocol) is supported. For downloading folders or receiving directory listings, FTP is required too. Other supported protocols are HTTP, HTTPS and FILE, which you might use for downloading files.
Note that any existing remote file or folder will be replaced by the new upload. This is particularly important when you upload your main directory. Should you upload a folder that is part of that directory and this folder is empty, you delete the contents of the remote folder!
Enter the connection data in the Connection Settings dialog for each of your web folders. This input is saved and will be retrieved together with the selected web folder. FTP access is tried as anonymous if neither user name nor password is provided.
When you use the Upload button or one of the two Upload commands from the Remote Access menu, HTML-OptimizerPlus will check if the selected file or folder belongs to the current web folder, to prevent uploading to the wrong web server. Any subdirectory of the selected file or folder will be automatically added to the host name as stored in the Connection Settings for the current web folder, in order to transfer the file or folder to the proper directory.
When using the Upload commands from the Remote Access menu, you can only upload from the current optimizer output folder, the current web folder or its 'duplimized' copy. Trying to upload a file or folder from outside these three folders will result in an error message.